/***************************************************************************
 *   Copyright (C) 2009 - 2010 by Simon Qian <SimonQian@SimonQian.com>     *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#ifndef __VSFHAL_CONST_H_INCLUDED__
#define __VSFHAL_CONST_H_INCLUDED__

#ifndef __inline
#define __inline							inline
#endif
#include "wm_regs.h"
#include "wm_io.h"

// common
#define VSFHAL_DUMMY_PORT					0xFF

// core
#define VSFHAL_SLEEP_WFI					(0x1ul << 0)
#define VSFHAL_SLEEP_PWRDOWN				(0x1ul << 1)

// GPIO
#define VSFHAL_GPIO_INPUT					0x02
#define VSFHAL_GPIO_OUTPP					0x03
#define VSFHAL_GPIO_OUTOD					0x01
#define VSFHAL_GPIO_PULLUP					0x00
#define VSFHAL_GPIO_PULLDOWN				0x00

// USART
#define vsfhal_usart_t						uint64_t
#define VSFHAL_USART_STOPBITS_1				0
#define VSFHAL_USART_STOPBITS_2				ULCON_STOP_2
#define VSFHAL_USART_PARITY_NONE			0
#define VSFHAL_USART_PARITY_ODD				ULCON_PMD_ODD
#define VSFHAL_USART_PARITY_EVEN			ULCON_PMD_EVEN

// IIC
#define vsfhal_i2c_t						uint8_t

#endif	// __VSFHAL_CONST_H_INCLUDED__
